<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Adding Recipients - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.mail.adding-recipients.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.mail.adding-recipients.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.mail.attachments.html">Attachments</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.mail.html">Zend_Mail</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.mail.boundary.html">Controlling the MIME Boundary</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.mail.adding-recipients" class="section"><div class="info"><h1 class="title">Adding Recipients</h1></div>
    

    <p class="para">
        Recipients can be added in three ways:
    </p>

    <ul class="itemizedlist">
        <li class="listitem">
            <p class="para">
                 <span class="methodname">addTo()</span>: Adds a recipient to the mail with a &quot;To&quot; header
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                 <span class="methodname">addCc()</span>: Adds a recipient to the mail with a &quot;Cc&quot; header
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                 <span class="methodname">addBcc()</span>: Adds a recipient to the mail not visible in the
                header
            </p>
        </li>
    </ul>

    <p class="para">
         <span class="methodname">getRecipients()</span> serves list of the recipients.
         <span class="methodname">clearRecipients()</span> clears the list.
    </p>

    <blockquote class="note"><p><b class="note">Note</b>: <span class="info"><b>Additional parameter</b><br /></span>
        

        <p class="para">
             <span class="methodname">addTo()</span> and  <span class="methodname">addCc()</span> accept a second
            optional parameter that is used as a human-readable name of the recipient for the
            header. Double quotation is changed to single quotation and angle brackets to square
            brackets in the parameter.
        </p>
    </p></blockquote>

    <blockquote class="note"><p><b class="note">Note</b>: <span class="info"><b>Optional Usage</b><br /></span>
        

        <p class="para">
            All three of these methods can also accept an array of email addresses
            to add instead of one at a time. In the case of  <span class="methodname">addTo()</span> and
             <span class="methodname">addCc()</span>, they can be associative arrays where the key is the
            human readable name for the recipient.
        </p>
    </p></blockquote>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.mail.attachments.html">Attachments</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.mail.html">Zend_Mail</a></span><br />
                        <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.mail.boundary.html">Controlling the MIME Boundary</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li>
  <li class="header up"><a href="reference.html">Zend Framework Reference</a></li>
  <li class="header up"><a href="zend.mail.html">Zend_Mail</a></li>
  <li><a href="zend.mail.introduction.html">Introduction</a></li>
  <li><a href="zend.mail.sending.html">Sending via SMTP</a></li>
  <li><a href="zend.mail.multiple-emails.html">Sending Multiple Mails per SMTP Connection</a></li>
  <li><a href="zend.mail.different-transports.html">Using Different Transports</a></li>
  <li><a href="zend.mail.html-mails.html">HTML E-Mail</a></li>
  <li><a href="zend.mail.attachments.html">Attachments</a></li>
  <li class="active"><a href="zend.mail.adding-recipients.html">Adding Recipients</a></li>
  <li><a href="zend.mail.boundary.html">Controlling the MIME Boundary</a></li>
  <li><a href="zend.mail.additional-headers.html">Additional Headers</a></li>
  <li><a href="zend.mail.character-sets.html">Character Sets</a></li>
  <li><a href="zend.mail.encoding.html">Encoding</a></li>
  <li><a href="zend.mail.smtp-authentication.html">SMTP Authentication</a></li>
  <li><a href="zend.mail.smtp-secure.html">Securing SMTP Transport</a></li>
  <li><a href="zend.mail.read.html">Reading Mail Messages</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>